package collection;

import java.util.ArrayList;
import java.util.Collection;

//集合 equals
public class CollectionDemo2 {
    public static void main(String[] args) {
        Collection c=new ArrayList();
        c.add(new Point(1,2));
        c.add(new Point(3,4));
        c.add(new Point(5,6));
        c.add(new Point(7,8));
        c.add(new Point(1,2));
       // c.add(new Point(null,null));
        System.out.println(c);

        Point p=new Point(1,2);
        boolean a=c.contains(p);
        System.out.println(a);

        c.remove(p);
        System.out.println(c);


    }
}
